package com.bjpowerndoe.ylb.mapper;

import com.bjpowerndoe.ylb.domain.ProductInfoPO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bjpowerndoe.ylb.map.BidUserMap;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
* @author Lenovo
* @description 针对表【b_product_info(产品信息表)】的数据库操作Mapper
* @createDate 2023-03-13 16:18:17
* @Entity com.bjpowerndoe.ylb.domain.ProductInfo
*/
public interface ProductInfoMapper extends BaseMapper<ProductInfoPO> {
    //查询某个产品的最近投资记录
    List<BidUserMap> selectRecentlyBidInfo(@Param("productId") Integer productId,
                                           @Param("offset") Integer offset,
                                           @Param("rows") Integer rows);

    //扣除产品剩余可投资金额
    int updateLeftProductMoneyForInvest(@Param("productId") Integer productId, @Param("investMoney") BigDecimal investMoney);

    //查询满标的理财产品
    List<ProductInfoPO> selectManBiaoList(@Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
}




